
#' calcualte important value for a community
#' 
#' @param com a quadrat community object with dbh attribute
#'
#'
#'
#'
#'
#'
#'
#' @export
important_value=function(com){
  relative_abundance=species_abundance(com)/total_abundance(com)
  relative_occurrence=species_frequency(com)
  relative_occurrence=relative_occurrence/sum(relative_occurrence)
  relative_biomass=tapply((com$dbh/2)^2,com$species,sum,na.rm=T)
  relative_biomass=relative_biomass/sum(relative_biomass)
  imp_value=(relative_abundance+relative_occurrence+relative_biomass)/3
  return(imp_value)
}